import service from '@/utils/request'

export const useItemsApi = (id: number) => {
	return service.get('/cardworld/items/' + id)
}

export const useItemsSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.put('/cardworld/items', dataForm)
	} else {
		return service.post('/cardworld/items', dataForm)
	}
}